﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;

namespace RazorSourceGenerator
{
    class Utils
    {
        private const string CAPTION = "RazorSourceGenerator";

        public static MessageBoxResult ShowInfo(string message, params string[] parameters)
        {
            var msg = string.Format(message, parameters);
            return MessageBox.Show(msg, CAPTION, MessageBoxButton.OK, MessageBoxImage.Information);
        }

        public static MessageBoxResult ShowError(string message, params string[] parameters)
        {
            var msg = string.Format(message, parameters);
            return MessageBox.Show(msg, CAPTION, MessageBoxButton.OK, MessageBoxImage.Error);
        }

        public static MessageBoxResult ShowWarn(string message, params string[] parameters)
        {
            var msg = string.Format(message, parameters);
            return MessageBox.Show(msg, CAPTION, MessageBoxButton.OK, MessageBoxImage.Warning);
        }

        public static MessageBoxResult ShowConfirmYesNoCancel(string message, params string[] parameters)
        {
            var msg = string.Format(message, parameters);
            return MessageBox.Show(msg, CAPTION, MessageBoxButton.YesNoCancel, MessageBoxImage.Warning);
        }

        public static MessageBoxResult ShowConfirmOKCancel(string message, params string[] parameters)
        {
            var msg = string.Format(message, parameters);
            return MessageBox.Show(msg, CAPTION, MessageBoxButton.OKCancel, MessageBoxImage.Warning);
        }
    }
}
